package com.easywan.core.logs;

import java.lang.reflect.Method;

import org.apache.log4j.Logger;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.aop.AfterReturningAdvice;
import org.springframework.aop.MethodBeforeAdvice;
/**
 * Before(前)  org.apringframework.aop.MethodBeforeAdvice
After-returning(返回后) org.springframework.aop.AfterReturningAdvice
After-throwing(抛出后) org.springframework.aop.ThrowsAdvice
Arround(周围) org.aopaliance.intercept.MethodInterceptor
Introduction(引入) org.springframework.aop.IntroductionInterceptor
 * @author Administrator
 *
 */

public class ToolsLogerAop  implements MethodBeforeAdvice,AfterReturningAdvice{
	Logger logger = Logger.getLogger(ToolsLogerAop.class);
	public void afterReturning(Object arg0, Method arg1, Object[] arg2, Object arg3) throws Throwable {
		System.out.println(arg0.getClass().getName());
		System.out.println(arg1.getName());
		System.out.println(arg2.length);
		System.out.println(arg3);
	}

	public void before(Method arg0, Object[] arg1, Object arg2) throws Throwable {
		System.out.println(arg0.getClass().getName());
		System.out.println(arg1.length);
		System.out.println(arg2.getClass().getName());
	}

}
